{#{% load staticfiles %}#}
{% load static %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1 , user-scalable=no">
    <title>图书查询</title>
    <link href="{% static 'plugins/bootstrap.css' %}" rel="stylesheet">
    <link href="{% static 'plugins/bootstrap-dashen.css' %}" rel="stylesheet">
    <link href="{% static 'plugins/font-awesome.css' %}" rel="stylesheet">
    <link href="{% static 'plugins/animate.css' %}" rel="stylesheet">
    <link href="{% static 'css/head.css' %}" rel="stylesheet">
    <link rel="icon" href="https://image.youis.top/00.png" sizes="32x32">
    <link href="{% static 'plugins/bootstrap-datetimepicker.min.css' %}" rel="stylesheet" media="screen">
</head>
<body style="margin-top:70px;">
<div class="container">
    {% include 'header.html' %}

    <div class="col-md-9 wow fadeInRight">
        <div class="row">
            {% for book in books_page %}
                {% if forloop.counter|add:-1|divisibleby:4 %}
                    <div class="col-md-3 bottom15" style="clear: left;">
                {% else %}
                    <div class="col-md-3 bottom15">
                {% endif %}
            <a href="#"><img class="img-responsive" src="{{ book.bookPhoto.url }}"/></a>
            <div class="showFields">
                <div class="field">
                    图书条形码:{{ book.barcode }}
                </div>
                <div class="field">
                    图书名称:{{ book.bookName }}
                </div>
                <div class="field">
                    图书所在类别:{{ book.bookTypeObj.bookTypeName }}
                </div>
                <div class="field">
                    图书价格:{{ book.price }}
                </div>
                <div class="field">
                    库存:{{ book.count }}
                </div>
                <div class="field">
                    出版日期:{{ book.publishDate }}
                </div>
                <div class="field">
                    出版社:{{ book.publish }}
                </div>
                <div class="field">
                    图书文件:
                    {% if book.bookFile == 'file/NoFile.jpg' %}
                        暂无文件
                    {% else %}
                        <a href='{{ book.bookFile.url }}' target='_blank'>{{ book.bookFile }}</a>
                    {% endif %}
                </div>
                <a class="btn  btn-info top5" href="{% url 'Book:frontShow' book.barcode %}">详情</a>
                <a class="btn  btn-info top5" onclick="bookEdit('{{ book.barcode }}');">修改</a>
                <a class="btn  btn-info top5" onclick="bookDelete('{{ book.barcode }}');">删除</a>
            </div>
            </div>
            {% endfor %}
            </div>
        </div>
    </div>
</div>
<script src="{% static 'plugins/jquery.min.js' %}"></script>
<script src="{% static 'plugins/bootstrap.js' %}"></script>
<script src="{% static 'plugins/wow.min.js' %}"></script>
<script src="{% static 'plugins/bootstrap-datetimepicker.min.js' %}"></script>
<script src="{% static 'plugins/locales/bootstrap-datetimepicker.zh-CN.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jsdate.js' %}"></script>
<script src="{% static 'tiny_mce/tiny_mce.js' %}"></script>
<script>


    $(function () {
        /*小屏幕导航点击关闭菜单*/
        $('.navbar-collapse a').click(function () {
            $('.navbar-collapse').collapse('hide');
        });
        new WOW().init();

        /*出版日期组件*/
        $('.book_publishDate_edit').datetimepicker({
            language: 'zh-CN',  //语言
            format: 'yyyy-mm-dd',
            minView: 2,
            weekStart: 1,
            todayBtn: 1,
            autoclose: 1,
            minuteStep: 1,
            todayHighlight: 1,
            startView: 2,
            forceParse: 0
        });
    })
</script>
</body>
</html>
